﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Web.View.t301Menu.Default" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>t301</title>
    <script src="/View/js/Alert.js" type="text/javascript"></script> 
    <script type="text/javascript">
        function SetWinData(index) {
            document.getElementById("Hid").value = t301_MainStore.getAt(index).get('t301_01');
            
			Txtt301_02.setValue(t301_MainStore.getAt(index).get('t301_02'));
			Txtt301_03.setValue(t301_MainStore.getAt(index).get('t301_03'));
			Txtt301_04.setValue(t301_MainStore.getAt(index).get('t301_04'));
			Txtt301_05.setValue(t301_MainStore.getAt(index).get('t301_05'));
			Txtt301_06.setValue(t301_MainStore.getAt(index).get('t301_06'));
			Txtt301_07.setValue(t301_MainStore.getAt(index).get('t301_07'));
			Txtt301_08.setValue(t301_MainStore.getAt(index).get('t301_08'));
			Txtt301_09.setValue(t301_MainStore.getAt(index).get('t301_09'));
			Txtt301_10.setValue(t301_MainStore.getAt(index).get('t301_10'));
			Txtt301_11.setValue(t301_MainStore.getAt(index).get('t301_11'));
			Txtt301_12.setValue(t301_MainStore.getAt(index).get('t301_12'));
			Txtt301_13.setValue(t301_MainStore.getAt(index).get('t301_13'));
			Txtt301_14.setValue(t301_MainStore.getAt(index).get('t301_14'));
			Txtt301_15.setValue(t301_MainStore.getAt(index).get('t301_15'));
			Txtt301_16.setValue(t301_MainStore.getAt(index).get('t301_16'));
			Txtt301_17.setValue(t301_MainStore.getAt(index).get('t301_17'));
			Txtt301_18.setValue(t301_MainStore.getAt(index).get('t301_18'));
			Txtt301_19.setValue(t301_MainStore.getAt(index).get('t301_19'));
			Txtt301_20.setValue(t301_MainStore.getAt(index).get('t301_20'));
			Txtt301_21.setValue(t301_MainStore.getAt(index).get('t301_21'));
			Txtt301_22.setValue(t301_MainStore.getAt(index).get('t301_22'));
			Txtt301_23.setValue(t301_MainStore.getAt(index).get('t301_23'));
			Txtt301_24.setValue(t301_MainStore.getAt(index).get('t301_24'));
			Txtt301_25.setValue(t301_MainStore.getAt(index).get('t301_25'));
			Txtt301_26.setValue(t301_MainStore.getAt(index).get('t301_26'));
			Txtt301_27.setValue(t301_MainStore.getAt(index).get('t301_27'));
			Txtt301_28.setValue(t301_MainStore.getAt(index).get('t301_28'));
			Txtt301_29.setValue(t301_MainStore.getAt(index).get('t301_29'));
			Txtt301_30.setValue(t301_MainStore.getAt(index).get('t301_30'));
			Txtt301_31.setValue(t301_MainStore.getAt(index).get('t301_31'));
			Txtt301_32.setValue(t301_MainStore.getAt(index).get('t301_32'));
			Txtt301_70.setValue(t301_MainStore.getAt(index).get('t301_70'));
			Txtt301_71.setValue(t301_MainStore.getAt(index).get('t301_71'));
			Txtcollection_time.setValue(t301_MainStore.getAt(index).get('collection_time'));

            t301_Win.show();
        }
    </script>
</head>
<body>
    <form id="MainForm" runat="server">
    <ext:ResourceManager ID="MainResourceMgr" runat="server" />
    <!--用来导出到Excel的数据源-->
    <ext:Hidden ID="ExcelGridData" runat="server" />
    <!--t301表页面主数据元，自动生成-->
    <ext:Store runat="server" ID="t301_MainStore" OnRefreshData="t301_DataBind" AutoLoad="true">
        <Proxy>
            <ext:PageProxy />
        </Proxy>
        <Reader>
            <ext:JsonReader IDProperty="t301_01">
                <Fields>
                    
					<ext:RecordField Name="t301_01" />
					<ext:RecordField Name="t301_02" />
					<ext:RecordField Name="t301_03" />
					<ext:RecordField Name="t301_04" />
					<ext:RecordField Name="t301_05" />
					<ext:RecordField Name="t301_06" />
					<ext:RecordField Name="t301_07" />
					<ext:RecordField Name="t301_08" />
					<ext:RecordField Name="t301_09" />
					<ext:RecordField Name="t301_10" />
					<ext:RecordField Name="t301_11" />
					<ext:RecordField Name="t301_12" />
					<ext:RecordField Name="t301_13" />
					<ext:RecordField Name="t301_14" />
					<ext:RecordField Name="t301_15" />
					<ext:RecordField Name="t301_16" />
					<ext:RecordField Name="t301_17" />
					<ext:RecordField Name="t301_18" />
					<ext:RecordField Name="t301_19" />
					<ext:RecordField Name="t301_20" />
					<ext:RecordField Name="t301_21" />
					<ext:RecordField Name="t301_22" />
					<ext:RecordField Name="t301_23" />
					<ext:RecordField Name="t301_24" />
					<ext:RecordField Name="t301_25" />
					<ext:RecordField Name="t301_26" />
					<ext:RecordField Name="t301_27" />
					<ext:RecordField Name="t301_28" />
					<ext:RecordField Name="t301_29" />
					<ext:RecordField Name="t301_30" />
					<ext:RecordField Name="t301_31" />
					<ext:RecordField Name="t301_32" />
					<ext:RecordField Name="t301_70" />
					<ext:RecordField Name="t301_71" />
					<ext:RecordField Name="collection_time" />

                </Fields>
            </ext:JsonReader>
        </Reader> 
        <BaseParams>
            <ext:Parameter Name="start" Value="0" Mode="Raw">
            </ext:Parameter>
            <ext:Parameter Name="limit" Value="15" Mode="Raw">
            </ext:Parameter>
        </BaseParams>
    </ext:Store>
    <!--t301页面主表格-->
    <ext:Viewport ID="MainViewPort" runat="server">
        <Items>
            <ext:FitLayout>
                <Items>
                    <ext:GridPanel ID="t301_Grid" Layout="fit" TrackMouseOver="true" runat="server" StoreID="t301_MainStore"
                        StripeRows="true" Header="false" Border="false" Collapsible="true">
                        <TopBar>
                            <ext:Toolbar ID="MainToolBar" runat="server">
                                <Items>
                                    <ext:Button ID="BtnAdd" runat="server" Text="添加" Icon="Add">
                                        <Listeners>
                                            <Click Handler="#{t301_MainForm}.getForm().reset();#{Hid}.setValue('');#{t301_Win}.show();" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:Button ID="BtnDel" runat="server" Text="删除" Icon="Delete">
                                        <DirectEvents>
                                            <Click OnEvent="BtnDel_Click">
                                                <Confirmation ConfirmRequest="true" Title="确认" Message="确实要删除吗?" />
                                                <EventMask ShowMask="true" Msg="正在删除数据，请等候 ..." />
                                            </Click>
                                        </DirectEvents>
                                        <Listeners>
                                            <Click Handler="if(#{t301_Grid}.getSelectionModel().getCount()<=0) {TellAlert('请选择要删除的记录');return false;}" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:ToolbarSeparator />
                                    <ext:Button ID="BtnReload" runat="server" Text="重新加载" Icon="Reload">
                                        <Listeners>
                                            <Click Handler="#{t301_MainStore}.reload();" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:ToolbarFill />
                                    <ext:Button ID="BtnToExcel" runat="server" Text="To Excel" AutoPostBack="true" OnClick="BtnSaveToExcel"
                                        Icon="PageExcel">
                                        <Listeners>
                                            <Click Handler="#{ExcelGridData}.setValue(Ext.encode(t301_Grid.getRowsValues(false)));" />
                                        </Listeners>
                                        <ToolTips>
                                            <ext:ToolTip Title="将当前页内容存储为Excel文件">
                                            </ext:ToolTip>
                                        </ToolTips>
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                        <ColumnModel ID="t301_ColumnMode" runat="server">
                            <Columns>
                                <ext:RowNumbererColumn Width="20" />
                                <ext:Column Header="主键" Sortable="true" Hidden="true" DataIndex="t301_01" />
                                
								<ext:Column Header="T301_02" Sortable="true" DataIndex="t301_02" />
								<ext:Column Header="T301_03" Sortable="true" DataIndex="t301_03" />
								<ext:Column Header="T301_04" Sortable="true" DataIndex="t301_04" />
								<ext:Column Header="T301_05" Sortable="true" DataIndex="t301_05" />
								<ext:Column Header="T301_06" Sortable="true" DataIndex="t301_06" />
								<ext:Column Header="T301_07" Sortable="true" DataIndex="t301_07" />
								<ext:Column Header="T301_08" Sortable="true" DataIndex="t301_08" />
								<ext:Column Header="T301_09" Sortable="true" DataIndex="t301_09" />
								<ext:Column Header="T301_10" Sortable="true" DataIndex="t301_10" />
								<ext:Column Header="T301_11" Sortable="true" DataIndex="t301_11" />
								<ext:Column Header="T301_12" Sortable="true" DataIndex="t301_12" />
								<ext:Column Header="T301_13" Sortable="true" DataIndex="t301_13" />
								<ext:Column Header="T301_14" Sortable="true" DataIndex="t301_14" />
								<ext:Column Header="T301_15" Sortable="true" DataIndex="t301_15" />
								<ext:Column Header="T301_16" Sortable="true" DataIndex="t301_16" />
								<ext:Column Header="T301_17" Sortable="true" DataIndex="t301_17" />
								<ext:Column Header="T301_18" Sortable="true" DataIndex="t301_18" />
								<ext:Column Header="T301_19" Sortable="true" DataIndex="t301_19" />
								<ext:Column Header="T301_20" Sortable="true" DataIndex="t301_20" />
								<ext:Column Header="T301_21" Sortable="true" DataIndex="t301_21" />
								<ext:Column Header="T301_22" Sortable="true" DataIndex="t301_22" />
								<ext:Column Header="T301_23" Sortable="true" DataIndex="t301_23" />
								<ext:Column Header="T301_24" Sortable="true" DataIndex="t301_24" />
								<ext:Column Header="T301_25" Sortable="true" DataIndex="t301_25" />
								<ext:Column Header="T301_26" Sortable="true" DataIndex="t301_26" />
								<ext:Column Header="T301_27" Sortable="true" DataIndex="t301_27" />
								<ext:Column Header="T301_28" Sortable="true" DataIndex="t301_28" />
								<ext:Column Header="T301_29" Sortable="true" DataIndex="t301_29" />
								<ext:Column Header="T301_30" Sortable="true" DataIndex="t301_30" />
								<ext:Column Header="T301_31" Sortable="true" DataIndex="t301_31" />
								<ext:Column Header="T301_32" Sortable="true" DataIndex="t301_32" />
								<ext:Column Header="T301_70" Sortable="true" DataIndex="t301_70" />
								<ext:Column Header="T301_71" Sortable="true" DataIndex="t301_71" />
								<ext:Column Header="COLLECTION_TIME" Sortable="true" DataIndex="collection_time" />

                            </Columns>
                        </ColumnModel>
                        <Listeners>
                            <RowDblClick Handler="SetWinData(rowIndex);" />
                        </Listeners>
                        <Plugins>
                            <ext:GridFilters runat="server" FiltersText="查找" ID="t301_Filter">
                                <Filters>
                                    
								<ext:StringFilter DataIndex="t301_02" />
								<ext:StringFilter DataIndex="t301_03" />
								<ext:StringFilter DataIndex="t301_04" />
								<ext:StringFilter DataIndex="t301_05" />
								<ext:StringFilter DataIndex="t301_06" />
								<ext:StringFilter DataIndex="t301_07" />
								<ext:StringFilter DataIndex="t301_08" />
								<ext:StringFilter DataIndex="t301_09" />
								<ext:StringFilter DataIndex="t301_10" />
								<ext:StringFilter DataIndex="t301_11" />
								<ext:StringFilter DataIndex="t301_12" />
								<ext:StringFilter DataIndex="t301_13" />
								<ext:StringFilter DataIndex="t301_14" />
								<ext:StringFilter DataIndex="t301_15" />
								<ext:StringFilter DataIndex="t301_16" />
								<ext:StringFilter DataIndex="t301_17" />
								<ext:StringFilter DataIndex="t301_18" />
								<ext:StringFilter DataIndex="t301_19" />
								<ext:StringFilter DataIndex="t301_20" />
								<ext:StringFilter DataIndex="t301_21" />
								<ext:StringFilter DataIndex="t301_22" />
								<ext:StringFilter DataIndex="t301_23" />
								<ext:StringFilter DataIndex="t301_24" />
								<ext:StringFilter DataIndex="t301_25" />
								<ext:StringFilter DataIndex="t301_26" />
								<ext:StringFilter DataIndex="t301_27" />
								<ext:StringFilter DataIndex="t301_28" />
								<ext:StringFilter DataIndex="t301_29" />
								<ext:StringFilter DataIndex="t301_30" />
								<ext:StringFilter DataIndex="t301_31" />
								<ext:StringFilter DataIndex="t301_32" />
								<ext:StringFilter DataIndex="t301_70" />
								<ext:StringFilter DataIndex="t301_71" />
								<ext:StringFilter DataIndex="collection_time" />

                                </Filters>
                            </ext:GridFilters>
                        </Plugins>
                        <LoadMask ShowMask="true" Msg="正在加载..." />
                        <SelectionModel>
                            <ext:CheckboxSelectionModel ID="CheckBoxGrid" runat="server" />
                        </SelectionModel>
                        <BottomBar>
                            <ext:PagingToolbar ID="PagingToolBar" StoreID="t301_MainStore" PageSize="15" runat="server" />
                        </BottomBar>
                    </ext:GridPanel>
                </Items>
            </ext:FitLayout>
        </Items>
    </ext:Viewport>
    
    <!--t301表修改，添加主窗体-->
    <ext:Window ID="t301_Win" Collapsible="true" Hidden="true" Modal="true"
        Maximizable="true" runat="server" Title="添加/修改记录" Icon="WorldEdit" Width="630" AutoHeight="true"
        Resizable="true">
        <Items>
            <ext:Hidden ID="Hid" runat="server">
            </ext:Hidden>
            <ext:FormPanel ID="t301_MainForm" LabelWidth="65" Frame="true" runat="server"
                Border="false" Height="540" Padding="5" Icon="UserAdd" Layout="Column">
                <Items>
                    <ext:Panel runat="server" Border="false" Header="false" ColumnWidth=".5" Layout="Form">
                        <Items>
                            
							<ext:TextField ID="Txtt301_02" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_02" />
							<ext:TextField ID="Txtt301_04" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_04" />
							<ext:TextField ID="Txtt301_06" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_06" />
							<ext:TextField ID="Txtt301_08" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_08" />
							<ext:TextField ID="Txtt301_10" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_10" />
							<ext:TextField ID="Txtt301_12" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_12" />
							<ext:TextField ID="Txtt301_14" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_14" />
							<ext:TextField ID="Txtt301_16" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_16" />
							<ext:TextField ID="Txtt301_18" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_18" />
							<ext:TextField ID="Txtt301_20" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_20" />
							<ext:TextField ID="Txtt301_22" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_22" />
							<ext:TextField ID="Txtt301_24" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_24" />
							<ext:TextField ID="Txtt301_26" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_26" />
							<ext:TextField ID="Txtt301_28" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_28" />
							<ext:TextField ID="Txtt301_30" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_30" />
							<ext:TextField ID="Txtt301_32" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_32" />
							<ext:TextField ID="Txtt301_71" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_71" />

                        </Items>
                    </ext:Panel>
                    <ext:Panel runat="server" Border="false" Header="false" ColumnWidth=".5" Layout="Form">
                        <Items> 
                            
							<ext:TextField ID="Txtt301_03" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_03" />
							<ext:TextField ID="Txtt301_05" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_05" />
							<ext:TextField ID="Txtt301_07" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_07" />
							<ext:TextField ID="Txtt301_09" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_09" />
							<ext:TextField ID="Txtt301_11" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_11" />
							<ext:TextField ID="Txtt301_13" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_13" />
							<ext:TextField ID="Txtt301_15" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_15" />
							<ext:TextField ID="Txtt301_17" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_17" />
							<ext:TextField ID="Txtt301_19" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_19" />
							<ext:TextField ID="Txtt301_21" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_21" />
							<ext:TextField ID="Txtt301_23" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_23" />
							<ext:TextField ID="Txtt301_25" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_25" />
							<ext:TextField ID="Txtt301_27" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_27" />
							<ext:TextField ID="Txtt301_29" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_29" />
							<ext:TextField ID="Txtt301_31" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_31" />
							<ext:TextField ID="Txtt301_70" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T301_70" />
							<ext:TextField ID="Txtcollection_time" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="COLLECTION_TIME" />

                        </Items>
                    </ext:Panel>
                </Items>
            </ext:FormPanel>
        </Items>
        <Buttons> 
            <ext:Button Text="提交" ID="BtnSave" runat="server" Icon="Disk">
                <DirectEvents>
                    <Click OnEvent="BtnSave_Click">
                        <EventMask ShowMask="true" Msg="正在提交，请等候 ..."  />
                    </Click>
                </DirectEvents>
                <Listeners>
                    <Click Handler="if (#{t301_MainForm}.getForm().isValid()) {;}else{Ext.Msg.show({icon: Ext.MessageBox.ERROR, msg: '您填写的信息不正确，请您确认！', buttons:Ext.Msg.OK});return false;}" />
                </Listeners>
            </ext:Button>
            <ext:Button Text="取消" ID="BtnConcel" Icon="Delete">
                <Listeners>
                    <Click Handler="#{t301_Win}.hide();" />
                </Listeners>
            </ext:Button>
        </Buttons>
    </ext:Window>
    </form>
</body>
</html>
